package com.scheduledtest.demo.constant;

public enum ScheduledStatus {
    ENABLE("aaa", "禁用"),
    DISABLE("bbbb", "启用");

    private String code;
    private String name;

    ScheduledStatus(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public static ScheduledStatus getByCode(String code) {
        for (ScheduledStatus st : values()) {
            if (code == st.getCode()) {
                return st;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
